using System;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Entity;

namespace Data
{
    public class CargoDA
    {
        #region Metodos Publicos
        public static DataTable ObtenerCargos()
        {
            SqlDatabase sqlClient = new SqlDatabase(Configuracion.GetConnection);
            DbCommand dbCmd = sqlClient.GetStoredProcCommand("pgen_cargotrab");
            sqlClient.AddInParameter(dbCmd, "@psintypesel", DbType.Int16, 0);
            return sqlClient.ExecuteDataSet(dbCmd).Tables[0];
        }
       #endregion
    }
}
